﻿@using SH = EMoney.IStock.Client.Framework.StringHelper;
@using EMoney.IStock.Client.Models.QQ;
@using EMoney.IStock.Client.Framework;
@{
    Layout = null;
    //高手揭秘
    ViewBag.Title = "rank_gsjm";

    Stocks stocks = (Stocks)ViewBag.Stocks;
    string stocksCode = string.Empty;
}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    @{
        if(stocks != null)
        {
            string stockcode = string.Empty; 
            List<StocksData> lst = stocks.data.OrderBy(x=>x.stock_id).ToList();
            if(lst !=null && lst.Count > 0)
            {
                int i = 1;
                foreach (StocksData item in lst)
                {
                    stockcode = SH.FormatQQStockCode(item.stock_code);                        
                    stocksCode += stockcode + ",";
                    
                    <tr onshow="@stockcode" onshown="@item.stock_name">
                        <td width="13%" align="center" valign="middle"><span class="yellow">@(item.stock_name)</span></td>
                        <td width="10%" align="center" valign="middle">&nbsp;<span class="blue">@stockcode &nbsp;</span></td>
                        <td width="10%" align="center" valign="middle">-</td>
                        <td width="11%" align="center" valign="middle">-</td>
                        <td width="13%" align="center" valign="middle">@(int.Parse(item.stock_count) +int.Parse(item.stock_count_today))</td>
                        <td width="13%" align="center" valign="middle">@(item.stock_cost)</td>
                        <td width="15%" align="center" valign="middle">-</td>
                        <td width="15%" align="center" valign="middle">-</td>
                    </tr>
                    i++;
                }
                
            }else
            {
                <tr><td colspan="8" style="text-align:center;">--无记录--</td></tr>
            }
                
        }   
     }    
</table>
<input type="hidden" id="hidStocks_jsjm" value="@stocksCode" />
<script type="text/javascript">
    $(document).ready(function () {
        $("#rankHtml table").undelegate("tr", "dblclick").delegate("tr", "dblclick", "", function (evt) {
            var code = $(this).attr("secu");
            if (code != null && code != undefined && code != "" && code != "undefined") {
                GoKLine(code);
            }
        });
    });
</script>